/*
 * @Author: chenzhikun
 * @Date: 2023-03-08 16:53:30
 * @LastEditTime: 2023-03-08 16:53:49
 * @LastEditors: your name
 * @Description: 
 * @FilePath: \my-vue-app\src\store\index.js
 * 
 */
import { createStore } from 'vuex';

export default createStore({
  state: {
    count: 0
  },
  mutations: {
    increment(state) {
      state.count++;
    }
  },
  actions: {
    increment(context) {
      context.commit('increment');
    }
  },
  getters: {
    count(state) {
      return state.count;
    }
  }
});
